import { Menu, Icon } from 'antd';
import React from 'react';
import { menuArr } from '../../utils/weChatMenu';
import styles from './WeChat.less';

class WechaMenu extends React.Component {
  render() {
    const { title, handleClick } = this.props;
    const menuRender = menuArr.map((item) => {
      return (
        <Menu.Item key={item.name} >
          <Icon type={item.icon} />{item.name}
        </Menu.Item>
      );
    });

    return (
      <Menu
        onClick={handleClick}
        selectedKeys={[title]}
        mode="horizontal"
        className={styles.menu}
      >
        {menuRender}
      </Menu>
    );
  }
}
export default WechaMenu;
